﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 版权所有 (c) 2022   保留所有权利。
 * CLR版本：4.0.30319.42000
 * 机器名称：DESKTOP-UL84BU5
 * 公司名称：
 * 命名空间：KingerRobot.WanliWMS.Spi
 * 唯一标识：c22506ad-0039-4ea3-aa79-f89867846ee3
 * 文件名：IMaterialManage
 * 当前用户域：DESKTOP-UL84BU5
 * 
 * 创建者：zzl
 * 电子邮箱：1003590782@qq.com
 * 创建时间：2022/7/4 10:44:13
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace KingerRobot.MexicoSailunWMS.Spi;

public interface IWarehouseManageService
{
    /// <summary>
    /// 查询 仓库信息
    /// </summary>
    /// <param name="materialPara"></param>
    /// <returns></returns>
    List<WarehouseBean> GetWarehouseBeans();
    /// <summary>
    /// 设置仓库可用性
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    int UpdateWarehouseUserFlag(long id, long userId, string userName, string clientHost);

    /// <summary>
    /// 查找堆垛机入库口信息
    /// </summary>
    /// <returns></returns>
    List<InWarehouseCountBean> GetInWarehouseCountBeans(WarehouseCountParam warehouseCountParam);
    /// <summary>
    /// 监控页面 显示堆垛机出入库数量接口
    /// </summary>
    /// <returns></returns>
    List<WcsAsrsCrnCountBean> GetInWarehouseCountBeansV2();
    /// <summary>
    /// 修改入库限制数量
    /// </summary>
    /// <param name="warehouseCountParam"></param>
    /// <returns>
    /// 0：失败
    /// -1：参数无
    /// -2：数量必须大于等于0
    /// </returns>
    int UpdateInWarehouseCount(UpdateWarehouseCountParam warehouseCountParam, long userId, string userName, string clientHost);
    /// <summary>
    /// 查找堆垛机出库口信息
    /// </summary>
    /// <returns></returns>
    List<OutWarehouseCountBean> GetOutWarehouseCountBeans(WarehouseCountParam warehouseCountParam);
    /// <summary>
    /// 修改出库限制数量
    /// </summary>
    /// <param name="warehouseCountParam"></param>
    /// <returns>
    /// 0：失败
    /// -1：参数无
    /// -2：数量必须大于等于0
    /// </returns>
    int UpdateOutWarehouseCount(UpdateWarehouseCountParam warehouseCountParam, long userId, string userName, string clientHost);

    /// <summary>
    /// 获取所有 仓库id-名称 键值对
    /// </summary>
    /// <returns></returns>
    List<WarehouseNameBean> GetAllWarehouseNameBeans();
}
public class WarehouseBean
{
    public long Id { get; set; }
    /// <summary>
    /// 库位名称
    /// </summary>
    public string WarehouseName { get; set; }
    /// <summary>
    /// 所有库位数量
    /// </summary>
    public int LocCount { get; set; }
    /// <summary>
    /// 可用性
    /// </summary>
    public bool UseFlag { get; set; }

    /// <summary>
    /// 可用库位数量
    /// </summary>
    public int UseLocCount { get; set; }
    /// <summary>
    /// 可用空库位数量
    /// </summary>
    public int UseLocEmptyCount { get; set; }
    /// <summary>
    /// 不可用库位数量
    /// </summary>
    public int DisableLocCount { get; set; }
    /// <summary>
    /// 堆垛机数量
    /// </summary>
    public int CrnCount { get; set; }


}
public class WarehouseNameBean
{
    /// <summary>
    /// 仓库id
    /// </summary>
    public long WarehouseId { get; set; }
    /// <summary>
    /// 仓库名
    /// </summary>
    public string WarehouseName { set; get; }

}



public class InWarehouseCountBean
{
    public long Id { get; set; }
    /// <summary>
    /// 区域名称
    /// </summary>
    public string AreaName { get; set; }
    /// <summary>
    /// 堆垛机名称
    /// </summary>
    public string CrnName { get; set; }
    /// <summary>
    /// B放胎位
    /// </summary>
    public string InputLoc1 { get; set; }
    /// <summary>
    /// A放胎位
    /// </summary>
    public string InputLoc2 { get; set; }
    /// <summary>
    /// 限制入库数量
    /// </summary>
    public int Number { get; set; }

    public string Reason { get; set; }

    public int? EquipEnable { get; set; }
}


public class WcsAsrsCrnCountBean
{
    public long Id { get; set; }
    /// <summary>
    /// 仓库名
    /// </summary>
    public string WarehoseName { get; set; }
    /// <summary>
    /// 区域id
    /// </summary>
    public long AreaId { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    public string ShowName { get; set; }


    public int Number { get; set; }

    public int Type { get; set; }

}
public class WarehouseCountParam
{
    /// <summary>
    /// 堆垛机名称
    /// </summary>
    public string CrnName { get; set; }

    /// <summary>
    /// 堆垛机编号 Id
    /// </summary>
    public string CrnCode { get; set; }

}
public class OutWarehouseCountBean
{
    public long Id { get; set; }
    /// <summary>
    /// 区域名称
    /// </summary>
    public string AreaName { get; set; }
    /// <summary>
    /// 堆垛机名称
    /// </summary>
    public string CrnName { get; set; }
    /// <summary>
    /// B放胎位
    /// </summary>
    public string OutputLoc1 { get; set; }
    /// <summary>
    /// A放胎位
    /// </summary>
    public string OutputLoc2 { get; set; }
    /// <summary>
    /// 限制入库数量
    /// </summary>
    public int Number { get; set; }

    public string Reason { get; set; }

    public int? EquipEnable { get; set; }
}

public class UpdateWarehouseCountParam
{
    public long Id { get; set; }

    /// <summary>
    /// 限制入库数量
    /// </summary>
    public int Number { get; set; }

    public string Remark { get; set; }
}



